﻿



function sharePointReady() {
    this.ctx = new SP.ClientContext.get_current();
    getListItems();
}
function getListItems() {
    var oWebsite = ctx.get_web();
    var collList = oWebsite.get_lists().getByTitle('Settings');
    var camlQuery = new SP.CamlQuery();
    camlQuery.set_viewXml('<View><RowLimit>10</RowLimit></View>');
    this.collListItem = collList.getItems(camlQuery);
    ctx.load(collListItem);
    ctx.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
}
function onQuerySucceeded() {
    var listItemInfo = '';
    var listItemEnumerator = collListItem.getEnumerator();
    while (listItemEnumerator.moveNext()) {
        var oListItem = listItemEnumerator.get_current();
        listItemInfo += '\nID: ' + oListItem.get_id()
            +
            ' \nTitle: ' + oListItem.get_item('Title') +            
            ' \nFullScrollableDisplayThumbnails: ' + oListItem.get_item('FullScrollableDisplayThumbnails') +
            ' \nCAMLQuery: ' + oListItem.get_item('FullScrollableCAMLQuery');
            


    }
    $(".help").append(listItemInfo.toString());
}

function onQueryFailed(sender, args) {
    alert('Request failed. ' + args.get_message() +
        '\n' + args.get_stackTrace());
}